//
//  ObjectRes.h
//  CandyJump
//
//  Created by Bon Lam on 01/03/2011.
//  Copyright 2011 Peru Republic. All rights reserved.
//

//=====================================================================================================================
@class Model;
@interface ObjectRes : NSObject <NSXMLParserDelegate>
{
	NSMutableDictionary *objectListDictionary;

	//	Used for reading XML
	Model* currentReadingModel;
}

//---------------------------------------------------------------------------------------------------------------------
@property(nonatomic, readonly, retain)NSMutableDictionary* objectListDictionary;

//---------------------------------------------------------------------------------------------------------------------
#pragma mark ObjectRes - Singleton
- (id)init;
- (void)dealloc;
+ (id)allocWithZone:(NSZone *)zone;
- (id)copyWithZone:(NSZone *)zone;
- (id)retain;
- (NSUInteger)retainCount;
- (void)release;
- (id)autorelease;

#pragma mark ObjectRes - Load Data
+ (ObjectRes *)sharedRes;
- (void)loadObjects;

#pragma mark ObjectRes - NSXMLParserDelegate
- (BOOL)parseXMLFile:(NSString *)filename;
- (void)parseXMLData:(NSData *)data parseError:(NSError **)error;
- (void)parser:(NSXMLParser *)parser didStartElement:(NSString *)elementName namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qName attributes:(NSDictionary *)attributeDict;
- (void)parser:(NSXMLParser *)parser didEndElement:(NSString *)elementName namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qName;
- (void)parser:(NSXMLParser *)parser parseErrorOccurred:(NSError *)parseError;
- (void)parserDidEndDocument:(NSXMLParser *)parser;

@end
